import React,{useState,useCallback}from 'react'
import Two from './components/Two.jsx'
export default function LayOut() {
    const [count,setCount] = useState(0)
    const [val,setVal] = useState(0)
    const total = useCallback(()=>{
        console.log('total');
    },[val])
    return (
        <div>
            <Two total={total}></Two>
            <button onClick={()=>{setCount(preCount=>preCount+1)}}>++</button>
            <input value={val} onChange={(e)=>{setVal(e.target.value)}}/>
            {count}
            123456789----改了
        </div>
    )
}
